// Copyright (c) 2022 Presto Labs Pte. Ltd.
// Author: fengyang

#pragma once

#include <memory>
#include <string>

#include "coin2/exchange/base/symbology/currency.h"
#include "coin2/exchange/base/symbology/util.h"

namespace coin2::exchange::crypto_futures::symbology {

class CryptoFuturesCurrency : public base::symbology::Currency,
                              public base::symbology::CurrencyFromStrMixin<CryptoFuturesCurrency> {
 public:
  using ExchangeType = base::market::ExchangeType;
  using MarketType = base::market::MarketType;
  using Currency = base::symbology::Currency;
  using base::symbology::Currency::native_currency;

 public:
  explicit CryptoFuturesCurrency(const std::string& currency)
      : Currency(currency, currency, ExchangeType::Crypto) {}

  static std::unique_ptr<CryptoFuturesCurrency> FromNativeStrImpl(
      const std::string& native_currency_str,
      int64_t resolve_timestamp) {
    return std::make_unique<CryptoFuturesCurrency>(native_currency_str);
  }

  static std::unique_ptr<CryptoFuturesCurrency> FromNormStrImpl(
      const std::string& currency_str,
      int64_t resolve_timestamp) {
    return std::make_unique<CryptoFuturesCurrency>(currency_str);
  }
};

}  // namespace coin2::exchange::crypto_futures::symbology
